<div class="breadcrumbs" id="breadcrumbs">
	<ul class="breadcrumb">
		<li><i class="icon-home home-icon"></i><a href="#">Home</a></li>
		<li><a href="<?php Rights::getBaseUrl(); ?>">Access Role</a></li>
		<li class="active">Tasks</li>
	</ul>
	<script type="text/javascript">
		try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
	</script>
</div>
<div class="col-xs-12">
	<div class="page-content">
		<div class="page-header">
			<div class="clearfix">
				<div class="pull-left">
					<h1>
						<h1><?php echo Rights::t('core', 'Tasks'); ?></h1>
					</h1>
				</div>
				<div class="pull-right">
					<div class="btn-toolbar inline middle no-margin">
						<div class="btn-group">
							<a title="Assignments" href="<?php echo Yii::app()->createUrl('rights/assignment/view'); ?>" class="btn btn-sm "><i class="icon-file"></i>&nbsp;&nbsp;Assignments</a>
							<a title="Permissions" href="<?php echo Yii::app()->createUrl('rights/authItem/permissions'); ?>" class="btn btn-sm "><i class="icon-file"></i>&nbsp;&nbsp;Permissions</a>
							<a title="Roles" href="<?php echo Yii::app()->createUrl('rights/authItem/roles'); ?>" class="btn btn-sm "><i class="icon-file"></i>&nbsp;&nbsp;Roles</a>
							<a title="Tasks" href="<?php echo Yii::app()->createUrl('rights/authItem/tasks'); ?>" class="btn btn-sm "><i class="icon-file"></i>&nbsp;&nbsp;Tasks</a>
							<a title="Operations" href="<?php echo Yii::app()->createUrl('rights/authItem/operations'); ?>" class="btn btn-sm "><i class="icon-file"></i>&nbsp;&nbsp;Operations</a>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="col-xs-12">
			<div class="widget-content">
				<p>
					<?php echo Rights::t('core', 'A task is a permission to perform multiple operations, for example accessing a group of controller action.'); ?><br />
					<?php echo Rights::t('core', 'Tasks exist below roles in the authorization hierarchy and can therefore only inherit from other tasks and/or operations.'); ?>
				</p>
				<p class="info"><?php echo Rights::t('core', 'Values within square brackets tell how many children each item has.'); ?></p>
				<p><?php echo CHtml::link(Rights::t('core', 'Create a new task'), array('authItem/create', 'type'=>CAuthItem::TYPE_TASK), array(
					'class'=>'add-task-link',
				)); ?></p>
			</div>
		</div>
		<div class="col-xs-12">
			<div class="widget-box">
				<div class="widget-header header-color-blue">
					<h5 class="bigger lighter">
						<i class="icon-table"></i>
						Roles table.
					</h5>
				</div>

				<div class="widget-body">
					<div class="widget-main no-padding">
						<?php $this->widget('bootstrap.widgets.TbGridView', array(
							'dataProvider'=>$dataProvider,
							'template'=>'{items}',
							'type'=>'striped bordered condensed',
							'emptyText'=>Rights::t('core', 'No tasks found.'),
							'htmlOptions'=>array('class'=>'grid-view task-table'),
							'columns'=>array(
								array(
									'name'=>'name',
									'header'=>Rights::t('core', 'Name'),
									'type'=>'raw',
									'htmlOptions'=>array('class'=>'name-column'),
									'value'=>'$data->getGridNameLink()',
								),
								array(
									'name'=>'description',
									'header'=>Rights::t('core', 'Description'),
									'type'=>'raw',
									'htmlOptions'=>array('class'=>'description-column'),
								),
								array(
									'name'=>'bizRule',
									'header'=>Rights::t('core', 'Business rule'),
									'type'=>'raw',
									'htmlOptions'=>array('class'=>'bizrule-column'),
									'visible'=>Rights::module()->enableBizRule===true,
								),
								array(
									'name'=>'data',
									'header'=>Rights::t('core', 'Data'),
									'type'=>'raw',
									'htmlOptions'=>array('class'=>'data-column'),
									'visible'=>Rights::module()->enableBizRuleData===true,
								),
								array(
									'header'=>'&nbsp;',
									'type'=>'raw',
									'htmlOptions'=>array('class'=>'actions-column'),
									'value'=>'$data->getDeleteTaskLink()',
								),
							)
						)); ?>
					</div>
				</div>
			</div>
		</div><!-- /span -->
		
	</div>
</div>

<?php
	// $this->breadcrumbs = array(
	// 'Rights'=>Rights::getBaseUrl(),
	// Rights::t('core', 'Tasks'),
	// ); 
?>
<script>
	$('.id-5').addClass('active');	
	$('.id-5').addClass('open');	
	$('.id-16').addClass('open');	
	$('.id-18').addClass('active');	
</script>